<template>
	<view>
		<view class="top">
			<view class="weather">
				<text>天气</text>
			</view>
			<view class="search-container">
				<input class="search-input" type="text" placeholder="请输入..." 
					/>
				<image src="/static/search.png"></image>
			</view>
		</view>
		<scroll-view class="nav-container" scroll-x="true">
			<view class="nav-item" v-for="(item, index) in navItems" :key="index">
				{{ item }}
			</view>
		</scroll-view>
		
		
	</view>
</template>

<script>
	export default {
		name: "IndexHeader",
		data() {
			return {
				navItems: ["关注", "推荐", "热榜", "发现", "直播", "泉州", "福建", "财经", "本地"]
			};
		},
		methods: {
			
		}
	}
</script>

<style scoped>
	.nav-container {
		white-space: nowrap;
		overflow-x: auto;
		background-color: #F5433F;


	}

	.nav-item {
		color: #fff;
		display: inline-block;
		padding: 10rpx 18rpx;
		margin-right: 5rpx;
		border-radius: 5rpx;
	}


	.top {
		padding: 10rpx 0;
		align-items: center;
		background-color: ;
		display: flex;
		justify-content: space-between;
	}


	.weather {
		padding-left: 100rpx;
		color: white;
		width: 50%;
	}

	.search-container {
		width: 50%;
		padding: 10rpx;
		display: flex;
		justify-content: left;
		position: relative;

	}

	.search-input {
		color: #000;
		background-color: #fff;
		width: 80%;
		padding:  30rpx  30rpx  30rpx 40px;
		box-sizing: border-box;
		border: 1px solid #ddd;
		border-radius: 40rpx;
	}

	.search-container image {
		width: 40rpx;
		height: 40rpx;
		position: absolute;
		left: 30rpx;
		top: 20rpx;
	}
</style>